<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

//echo "tax1";

require_once("includes/connect.php");
require_once("includes/function.php");

$sql = "SELECT SUM(tax1) AS tax1"
        . " FROM tbl_pet "
        . " UNION "
        . " SELECT SUM( tax1 ) AS tax1 "
        . " FROM  tbl_salary , tbl_init "
        . " WHERE tbl_salary.id = tbl_init.card_id";


$result = mysql_query($sql);

$sum_tax1 = 0;
while ($rows = mysql_fetch_object($result)) {
    $sum_tax1 += $rows->tax1;
}

echo $sum_tax1;

?>

